package com.ruoyi.sj.mapper;

import com.ruoyi.sj.domain.RedReceive;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 接收红包（金包） 数据层
 * 
 * @author tyc@yanyu.com
 * @date 2018-12-28
 */
public interface RedReceiveMapper 
{
	/**
     * 查询接收红包（金包）信息
     * 
     * @param id 接收红包（金包）ID
     * @return 接收红包（金包）信息
     */
	public RedReceive selectRedReceiveById(Integer id);
	
	/**
     * 查询接收红包（金包）列表
     * 
     * @param redReceive 接收红包（金包）信息
     * @return 接收红包（金包）集合
     */
	public List<RedReceive> selectRedReceiveList(RedReceive redReceive);
	
	/**
     * 新增接收红包（金包）
     * 
     * @param redReceive 接收红包（金包）信息
     * @return 结果
     */
	public int insertRedReceive(RedReceive redReceive);
	
	/**
     * 修改接收红包（金包）
     * 
     * @param redReceive 接收红包（金包）信息
     * @return 结果
     */
	public int updateRedReceive(RedReceive redReceive);
	
	/**
     * 删除接收红包（金包）
     * 
     * @param id 接收红包（金包）ID
     * @return 结果
     */
	public int deleteRedReceiveById(Integer id);
	
	/**
     * 批量删除接收红包（金包）
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	public int deleteRedReceiveByIds(String[] ids);

	int receiveRed(@Param("memberId") Long memberId,@Param("redId")  Integer redId);

	String selectMoney(@Param("memberId") Long memberId,@Param("redId")  Integer redId);

	List<RedReceive> selectRedReceiveByMemberId(RedReceive redReceive);
}